2: COMMENT ⊗ VALID 00029 PAGES 3: C REC PAGE DESCRIPTION 4: C00001 00001 5: C00004 00002 BEGIN DTCSER - DECTAPE SERVICE ROUTINE 6: C00006 00003 DECTAPE DISPATCH TABLE 7: C00008 00004 RENAME UUO ROUTINE 8: C00013 00005 ROUTINE TO MOVE 4 WORD DIRECTORY ENTRY FROM USER 9: C00014 00006 ROUTINE TO SEARCH DIRECTORY FOR ENTER AND LOOKUP 10: C00016 00007 DUMP OUTPUT UUO ROUTINE 11: C00017 00008 DUMP INPUT UUO ROUTINE 12: C00020 00009 OUTPUT UUO ROUTINE -BUFFERED 13: C00023 00010 WRITE BLOCK 1 - COPY USER BUFFER INTO EXEC DIRECTORY CORE BUFFER 14: C00024 00011 INPUT UUO ROUTINE - RING BUFFERED 15: C00027 00012 ILLEGAL BLOCK NO. 16: C00029 00013 COMMON ROUTINE TO CHECK INTERLOCK, INITIALIZE 17: C00031 00014 ROUTINE TO CHECK IF DIRECTORY IN CORE 18: C00033 00015 CLOSE UUO 19: C00034 00016 UTPCLR UUO - CLEAR DECTAPE DIRECTORY 20: C00037 00017 USETI UUO - SET NEXT INPUT BLOCK NO TO READ 21: C00039 00018 UGETF UUO - GET NEXT FREE BLOCK NO. 22: C00040 00019 READ BLOCK NOS. 23: C00043 00020 HERE WHEN BLOCK NO.FOUND FOR DUMP OUTPUT 24: C00045 00021 HERE WHEN BLOCK NUMBER FOUND FOR BUFFERED WRITING 25: C00046 00022 HERE WHEN BLOCK NUMBER FOUND FOR BUFFERED INPUT 26: C00048 00023 WRITE 1 BLOCK IN REVERSE DIRECTION 27: C00049 00024 ↑ENPT0: JSR ENPT1 28: C00051 00025 HERE ON INTERRUPTS ON DECTAPE CONTROL AFTER DATA TRANSMITTED 29: C00055 00026 STOP TAPE AND DESELECT THIS UNIT BEFORE GOING TO ANOTHER UNIT 30: C00058 00027 INTERRUPT ON DT CHANNEL WHILE READING BLOCK NOS. ON DC CHANNEL 31: C00060 00028 HERE ON EACH OF 5 TYPES OF HARDWARE DETECTED ERRORS 32: C00062 00029 DTREDO: SKIPE TAC,ERRFLG CLEAR ERROR COUNT,DID DC MISS DATA? 33: C00065 ENDMK 34: C⊗; 36: BEGIN DTCSER - DECTAPE SERVICE ROUTINE 37: SUBTTL DTCSER 8 SEPT 67 38: 39: ;SPECIAL I/O STATUS BITS 40: 41: RBNTRY←←20 ;NUMBER OF TIMES HE CAN 42: 43: UDIREN←←200 ;DIRECTORY HAS BEEN ENTERED INTO BY ENTER UUO 44: UNWFRE←←400 ;FREE BLOCK POINTER HAS BEEN CHANGED IN CORE 45: ULINKF←←1000 ;LAST OUTPUT BLOCK LINKED TO FREE STORAGE 46: UDMPO←←2000 ;DUMP OUTPUT AS OPPOSED TO BUFFERED OUTPUT 47: UDMPI←←4000 ;DUMP INPUT AS OPPOSED TO BUFFERED INPUT 48: UREV←←10000 ;UNIT LAST WENT IN REVERSE DIRECTION 49: URDIR←←20000 ;READING DIRECTORY(BLOCK 1) 50: UDSD←←100 ;SUPPRESS DIRECTORY HANDLING (RH IOS). SET BY 51: ;INIT OR SETSTS. CLEARED BY SETSTS OR RELEASE. 52: 53: ;CONO BITS FOR UTC 54: 55: SL←←220000 ;TURN ON, SELECT UNIT 56: DTR←←3000 ;START/STOP DELAY (300 MS) 57: DT←←2000 ;TURN AROUND DELAY (160 MS) 58: RDS←←1000 ;RESELECT DELAY (20 MS) 59: RD←←300 ;READ DATA 60: WD←←700 ;WRITE DATA 61: RB←←200 ;READ BLOCK NOS. 62: GR←←10000 ;GO IN REVERSE DIRECTION(BACKWARDS) 63: JDE←←40000 ;JOB DONE ENABLE 64: EE←←100000 ;ENABLE END FLAG 65: TFE←←4000 ;TIME FLAG ENABLE 66: 67: DCIN←←4010+DCTCHN 68: DCOUT←←3410+DCTCHN 70: ;DECTAPE DISPATCH TABLE 71: 72: 73: 74: JRST DTCINI ;INITILIZE 75: JRST DTC1 ;DEVICE HUNG TIME OUT, STOP TAPE, AND JOB 76: ↑DTCDSP: 77: JRST UTPREL ;RELEASE 78: JRST UTPCLS ;CLOSE 79: JRST UOUT ;OUTPUT - BUFFERED 80: JRST UIN ;INPUT - BUFFERED 81: JRST UENTER ;ENTER FILE NAME IN DIRECTORY 82: JRST ULOOK ;LOOKUP FILE NAME IN DIRECTORY 83: JRST UOUTD ;OUTPUT - DUMP MODE 84: JRST UIND ;INPUT - DUMP MODE 85: JRST SETO ;USETO - SET NEXT OUTPUT BLOCK NO. 86: JRST SETI ;USETI - SET NEXT INPUT BLOCK NO. 87: JRST GETF ;UGETF - GET NEXT FREE BLOCK NO. 88: JRST DTCREN ;RENAME - CALL NEW ROUTINE - RPH 89: POPJ PDP, ;CLOSE - INPUT 90: JRST UTPCLR ;UTPCLR - CLEAR DIRECTORY (CALL [SIXBIT /UTPCLR/] 91: POPJ PDP, ;MTAPE - IGNORE ON DECTAPE 92: 93: ;INITIALIZE DECTAPE 94: 95: 96: DTCINI: CONO DTC,0 ;CLEAR CONTROL 97: HLLZS DTCCON ;CLEAR CONSO FLAGS 98: CONO DC,0 ;CLEAR DATA CONTROL 99: IFE MTCNUM,< ; IF MAG TAPES IN SYSTEM, THEY 100: ; WILL SET UP DCLOC AND DCLOC1 101: MOVEI TAC,40+DCTCHN*2 102: CONSZ APR,MAOFF 103: ADDI TAC,100 104: MOVEM TAC,DCLOC 105: ADDI TAC,1 106: MOVEM TAC,DCLOC1 107: > 108: POPJ PDP, 110: ;RENAME UUO ROUTINE 111: 112: DTCREN: TRNE IOS,UDSD ;SUPPRESSING DIRECTORY? 113: JRST CPOPJ1 ;YES, GIVE SUCCESS RETURN 114: SKIPE TAC,CURENT(DDB) ;PICK UP CURRENT ENTRY POINTER AND CHECK 115: SKIPN (TAC) ;AND MAKE SURE ITS THERE 116: POPJ P, ;ERROR RETURN 117: MOVSI IOS,UDIREN ;MAKE SURE DIRECTORY GETS OUT 118: IORB IOS,DEVIOS(DDB) 119: XCTR XR,[SKIPN (UUO)] ;DELETING? 120: JRST DTCDEL ;YES 121: XCTR XR,[MOVE TAC1,(UUO)] 122: MOVEM TAC1,(TAC) 123: XCTR XR,[MOVE TAC1,1(UUO)] 124: HLLM TAC1,1(TAC) 125: XCTR XR,[MOVE TAC1,2(UUO)] 126: MOVEM TAC1,2(TAC) 127: XCTR XR,[MOVE TAC1,3(UUO)] 128: MOVEM TAC1,3(TAC) 129: JRST CPOPJ1 130: 131: DTCDEL: SETZM CURENT(DDB) ;CLEAR CURRENT ENTRY POINTER SINCE WE ARE DELETING IT 132: HRLI TAC,4(TAC) ;PREPARE TO BLT DOWN OVER THIS ENTRY 133: HRRZ TAC1,UDIR(DDB) ;ADDR OF DIRECTORY 134: BLT TAC,177(TAC1) ;BLT DIR DOWN 135: SETZM 177(TAC1) ;CLEAR END IN CASE WASN'T 0 136: SETZM 176(TAC1) 137: SETZM 175(TAC1) 138: SETZM 174(TAC1) 139: JRST CPOPJ1 140: 141: ;LOOKUP UUO ROUTINE 142: 143: ;CALL: LOOKUP D,E 144: ; NOT FOUND IN DIRECTORY RETURN 145: ; FOUND 146: 147: ;C(E)=LEFT JUSTIFIED SIXBIT FILE NAME 148: ;C(E+1)=LH=LEFT JUSTIFIED 3 CHAR. SIXBIT FILE NAME EXTENSION 149: ; RH=FIRST BLOCK NO. IN FILE 150: ;C(E+2)=RIGHT 12 BITS=DATE FILE WAS CREATED 151: ;C(E+3)=BLKI POINTER FOR DUMPE SAVE-GET FILES 152: 153: 154: 155: ULOOK: TRNE IOS,UDSD ;SUPPRESSING DIRECTORY? 156: JRST CPOPJ1 ;YES. 157: SETZM CURENT(DDB) ;CLEAR CURRENT ENTRY POINTER 158: PUSHJ PDP,UDIRSH ;NO. SEARCH DIRECTORY 159: POPJ PDP, ;NOT FOUND ERROR RETURN 160: HRR DAT,1(TAC) ;FIRST BLOCK OF FILE 161: HRRZM TAC,CURENT(DDB) ;SAVE REL ADDR OF CURRENT ENTRY 162: HRRM DAT,DTNEXT(DEVDAT) ;SET NEXT INPUT BLOCK NO. 163: TLZ TAC,-1 ;CLEAR INDEX FIELD, DIRECTORY IS ABSOLUTE 164: MOVE DAT,UUO ;SETUP DESTINATION POINTER 165: JRST BLTENT ;BLOCK TRANSFER 4 WORD ENTRY 166: 167: 168: ;ENTER UUO ROUTINE 169: 170: UENTER: TRNE IOS,UDSD ;SUPPRESSING DIRECTORY? 171: JRST CPOPJ1 ;YES. GIVE SUCCESSFUL RETURN 172: SETZM CURENT(DDB) ;CLEAR CURRENT ENTRY POINTER 173: SKIPN @UUO ;NO. NULL NAME? 174: POPJ PDP, ;YES. ERROR 175: PUSHJ PDP,UDIRSH ;NO. SEARCH DIRECTORY. 176: JRST UENTE1 ;NOT IN DIRECTORY. 177: SKIPL 3(TAC) ;IN DIRECTORY. IS IT A DUMP FILE? 178: JRST UENTE1 ;NO 179: ADDI UUO,3 ;YES, GET NEW BLKO POINTER 180: MOVE TAC1,@UUO 181: SUBI UUO,3 182: JUMPGE TAC1,UENTE1 ;IS THIS A LEGITIMATE BLKO POINTER? 183: CAMGE TAC1,3(TAC) ;YES. IS NEW FILE SHORTER THAN OLD. 184: JRST UENTE1 ;NO.IT'S LONGER. PUT IT AT END OF TAPE 185: HRRZ DAT,1(TAC) ;YES. RE-SAVE AT SAME SPOT ON TAPE 186: CAME TAC1,3(TAC) ;SAME SIZE BLOCK? 187: TLO IOS,UDIREN ;NO. SET UDIREN SO DIRECTORY WILL BE 188: ;WRITTEN ON RELEASE. 189: JRST UENTE2 190: UENTE1: TLO IOS,UNWFRE+ULINKF+UDIREN ;FILE GOES AT END OF TAPE 191: AOS DAT,UFREE(DEVDAT) ;GET FIRST FREE BLOCK 192: UENTE2: AOS UUO ;POINT TO SECOND DIRECTORY WORD IN USER AREA 193: HRRZM TAC,CURENT(DDB) ;SAVE CURRENT ENTRY POINTER 194: HRRM DAT,@UUO ;STORE FIRST BLOCK NO. OF FILE 195: HRLM DAT,DTNEXT(DEVDAT) ;STORE NEXT BLOCK TO WRITE 196: HRRZ DAT,TAC ;SET DESTINATION IN CORE DIRECTORY AREA 197: SOS TAC,UUO ;SET SOURCE TO USER AREA 198: MOVEM IOS,DEVIOS(DEVDAT) 199: 201: ;ROUTINE TO MOVE 4 WORD DIRECTORY ENTRY FROM USER 202: ;AREA TO MONITOR OR VICE VERSA 203: ;SOURCE IN AC TAC, DESTINATION IN AC DAT 204: 205: BLTENT: NOSHUFFLE ;PREVENT CORE SHUFFLING DURING BLT 206: MOVSI TAC1,@TAC ;SETUP ABS. SOURCE POINTER 207: HRRI TAC1,@DAT ;SETUP ABS. DESTINATION POINTER 208: MOVEI DAT,@DAT ;ABS. STOP ADDRESS 209: BLT TAC1,3(DAT) 210: MOVEI TAC,@TAC ;ABS. SOURCE ADDR. 211: LDB TAC1,[POINT 12,2(TAC),35] ;GET SOURCE DATE 212: JUMPN TAC1,BLTEN1 ;IS IT ALREADY SET? 213: MOVE TAC1,THSDAT ;NO, USE TODAYS DATE 214: DPB TAC1,[POINT 12,2(DAT),35] ;AND SET DESTINATION DATE 215: BLTEN1: SHUFFLE ;ALLOW SHUFFLING AGAIN 216: JRST CPOPJ1 ;SKIP RETURN TO USER 218: ;ROUTINE TO SEARCH DIRECTORY FOR ENTER AND LOOKUP 219: ;CALL: PUSHJ PDP,UDIRSH 220: ; NOT IN DIRECTORY RETURN 221: ; NORMAL RETURN WHEN ENTRY IS FOUND 222: ; NEVER RETURNS IF DIRECTORY FULL 223: 224: 225: 226: UDIRSH: MOVEI AC1,3(UUO) ;IS LAST WORD IF ENTRY IN BOUNDS? 227: PUSHJ PDP,UADCK1 ;NEVER RETURN IF OUT OF BOUNDS 228: PUSHJ PDP,DIRCHK ;CHECK IF DIRECTORY IN CORE 229: HRRZ TAC,UDIR(DEVDAT) ;LOC. OF DIRECTORY 230: HRRZ TAC1,(TAC) ;REL. ADR. OF 1ST ENTRY 231: HRLI TAC,-=129+4(TAC1) ;ENTRY COUNTER 232: ADDM TAC1,TAC ;START OF FIRST ENTRY 233: UDIR2: SKIPN TAC1,(TAC) ;FIRST WORD OF NEXT ENTRY 234: POPJ PDP, ;FILE NOT IN DIRECTORY RETURN 235: CAMN TAC1,@UUO ;CHECK IF EQUAL TO USER AREA 236: AOJA UUO,UDIR4 ;IS IS CHECK FILE EXTENSION 237: UDIR3: ADD TAC,[XWD 4,4] 238: JUMPL TAC,UDIR2 ;FINISHED YET? 239: JRST TPOPJ ;YES ERROR RETURN TO USER(POP,POPJ) 240: 241: UDIR4: HLRZ TAC1,@UUO 242: SOS UUO 243: ; JUMPE TAC1,CPOPJ1 ;MATCH IF USER EXT. IS ZERO 244: HLRZ DAT,1(TAC) ;EXTENSION IN DIRECTORY 245: CAIE DAT,(TAC1) ;EXTENSION MATCH? 246: JRST UDIR3 ;NO, KEEP LOOKING 247: JRST CPOPJ1 ;YES, SETUP RETURN 249: ;DUMP OUTPUT UUO ROUTINE 250: ;CALL: OUTPUT D,ADR 251: ;WHERE ADR IS START OF A COMMAND LIST OF FOLLOWING FORM: 252: ; IOWD N,LOC ;ARBITRARY NO OF THESE 253: ; XWD 0,LOC1 ;ARBITRARYNO OF THESE 254: ; 0 255: 256: 257: 258: UOUTD: TLO IOS,IO+UDMPO ;FLAG OUTPUT AND DUMP-OUTPUT 259: MOVEI TAC,DWRITE ;DISPATCH ADR. WHEN BLOCK NO. FOUND 260: PUSHJ PDP,UINTER ;CHECK INTERLOCK AND INITIALIZE 261: HLRZ TAC,DTNEXT(DEVDAT) ;NEXT OUTPUT BLOCK NO. 262: TRNN IOS,UDSD ;SUPPRESSING DIRECTORY? 263: CAILE TAC,1 ;TRYING TO WRITE BLOCK 0 OR BLOCK 1 264: JRST DFILL ;NO. 265: JRST UTBERR ;YES, STOP TAPE AND PRINT ERROR MESSAGE 267: ;DUMP INPUT UUO ROUTINE 268: ;CALL: INPUT D,ADR 269: 270: UIND: TLZ IOS,IO ;FLAG INPUT IN PROGRESS 271: TLO IOS,UDMPI ;AND INPUT DUMP 272: MOVEI TAC,DREAD ;DISPATCH ADR. WHEN BLOCK NO. FOUND 273: PUSHJ PDP,UINTER ;CHECK INTERLOCK 274: HRRZ TAC,DTNEXT(DEVDAT) ;BLOCK NO. TO BE READ 275: 276: DFILL: HRRM TAC,UBKN ;STORE FIRST BLOCK NO(LAST WILL BE CHECKED) 277: MOVE TAC1,[JSR DMPADV] 278: MOVEM TAC1,@DCLOC1 ;WHERE TO GO WHEN BLKO/BLKI FINISHED 279: MOVEI TAC1,16 ;SET ERROR FLAGS(ALL EXCEPT INCOMPLETE BLOCK) 280: HRRM TAC1,CONSZ1 281: HRRZM PROG,UDPROG ;STORE JUST USER RELOCATION(FOR DMPADV) 282: PUSHJ PDP,COMCHK ;CHECK ENTIRE DUMP COMMAND LIST 283: JRST ADRER ;ADDRESS CHECK 284: SKIPN @UUO ;IS COMMAND LIST EMPTY? 285: JRST DTC1 ;YES, STOP TAPE AND RETURN 286: SOS DAT 287: ASH DAT,-7 ;CONVERT TO BLOCK COUNT-1 288: ADDI DAT,@UBKN ;ADD FIRST BLOCKNO. 289: TRNE IOS,UDSD ;NON-STANDARD TAPE? 290: JRST .+3 ;YES, DON'T CHECK BLOCK NO. 291: CAILE DAT,1101 ;LAST BLOCK TOO HIGH? 292: JRST UTBERR ;YES 293: TLNN IOS,IO ;OUTPUT? 294: AOJA DAT,UMPIN ;NO, SET DAT TO NEXT BLOCK AFTER FILE 295: HRRZ TAC,UFREE(DEVDAT) 296: CAMGE DAT,TAC ;YES, GREATER THAN CURRENT FREE BLOCK? 297: JRST IMPOT ;NO 298: HRRM DAT,UFREE(DEVDAT) ;YES, SET LAST BLOCK USED 299: AOS DAT ;SET DAT TO BLOCK NO. AFTER FILE 300: HRLM DAT,DTNEXT(DEVDAT) ;SET NEXT BLOCK TO WRITE(AFTER THIS) 301: TLOA IOS,UNWFRE ;FLAG AS MODIFIED 302: UMPIN: HRRM DAT,DTNEXT(DEVDAT) ;SET NEXT BLOCK TO READ 303: IMPOT: MOVEM IOS,DEVIOS(DEVDAT) 304: MOVEI TAC,@UUO ;ABS. ADR. OF FIRST COMMAND 305: MOVEM TAC,DMPLST ;STORE 306: MOVE TAC,@DMPLST ;GET FIRST BLK POINTER 307: ADDI TAC,(PROG) ;RELOCATE IOWD ADDRESS 308: MOVEM TAC,DMPPTR ;SET DUMP BLKI/BLKO POINTER 309: JRST FILL1 ;GO START TAPE(FIRST BLOCK NO ALREADY STORED) 310: 311: ADRER: PUSHJ PDP,DTC1 ;GO RELEASE TAPE 312: JRST ADRERR ;STOP JOB AND PRINT ADDRESS CHECK MESSAGE 314: ;OUTPUT UUO ROUTINE -BUFFERED 315: 316: 317: UOUT: NOSHUFFLE 318: MOVEI TAC,@DEVOAD(DEVDAT) 319: SKIPN 1(TAC) ;WORD COUNT ZERO? 320: JRST DTNOPO ;YES. 321: SHUFFLE 322: TLZ IOS,UDMPO+ULINKF ;CLEAR OUTPUT DUMP BIT 323: ;AND LINKED TO FREE STORAGE 324: TLO IOS,IO ;FLAG THAT OUTPUT IS BEING DONE 325: HLRZ TAC1,DTNEXT(DEVDAT) ;OUTPUT BLOCK NO. TO WIRTE 326: TRNE IOS,UDSD ;SUPPRESSING DIRECTORY? 327: JRST UOUT2 ;YES 328: CAIN TAC1,1 ;TRYING TO WRITE BLOCK 1? 329: JRST UOUT4 ;YES, COPY INTO MONITOR DIR. AREA 330: UOUT2: MOVEI TAC,WRITE ;SETUP DISPATCH WHEN CURRENT BLOCK NO. FOUND 331: PUSHJ PDP,UINTER ;CHECK INTERLOCK 332: 333: ;HERE AT INTERRUPT LEVEL IF NEXT BUFFER READY WITH DATA TO GO OUT 334: 335: UOUTGO: MOVEI TAC,@DEVOAD(DEVDAT) ;ABS. ADR. OF USER OUTPUT BUFFER 336: MOVEM TAC,UBUF 337: TLZ IOS,ULINKF ;FLAG THIS BLOCK NOT LINKED TO FREE STORAGE 338: HLRZ TAC1,1(TAC) ;BLOCK TIE FROM BUFFER(NEXT BLOCK) 339: JUMPN TAC1,UOUT1 ;USE BLOCK NO.INDICATED IF NON ZERO 340: TLO IOS,UNWFRE+ULINKF ;FLAG LINKED TO FREE STORAGE 341: AOS TAC1,UFREE(DEVDAT) ;NEXT FREE BLOCK 342: UOUT1: MOVEM IOS,DEVIOS(DEVDAT) 343: ;STORE WHETHER THIS BLOCK 344: ;LINKED TO FREE STORAGE 345: ;AND FREE BLOCK POINTER 346: ;MODIFIED. 347: TLZ TAC1,-1 ;GET UFREE ALONE 348: CAIN TAC1,1 ;IF 1, THIS IS LAST BLOCK(SET BY CLOSE) 349: MOVEI TAC1,0 ;SET BLOCK TIE TO 0 350: HRLM TAC1,1(TAC) ;IN USER BUFFER 351: HLRZ TAC,DTNEXT(DEVDAT) ;BLOCK TO WRITE NOW 352: HRLM TAC1,DTNEXT(DEVDAT) ;STORE BLOCK TO WRITE NEXT 353: JRST FILL ;GO START TAPE 354: 355: DTNOPO: SHUFFLE 356: PUSHJ PDP,ADVBFE ;WORD COUNT WAS ZERO. IGNORE BUFFER 357: JFCL 358: POPJ PDP, ;RETURN TO UUOCON 360: ;WRITE BLOCK 1 - COPY USER BUFFER INTO EXEC DIRECTORY CORE BUFFER 361: 362: 363: 364: UOUT4: NOSHUFFLE ;NO SHUFFLING DURING BLT 365: MOVEI TAC1,@DEVOAD(DEVDAT) ;ABS. ADR. OF USER BUFFER 366: MOVSI TAC1,1(TAC1) ;SOURCE IS THIRD WORD OF USER BUFFER 367: HRR TAC1,UDIR(DEVDAT) ;ADR. OF DIRECTORY BUFFER IN EXEC 368: MOVE TAC,TAC1 369: BLT TAC1,177(TAC) ;MOVE 200 WORDS FROM USER TO EXEC 370: SETZM CURENT(DDB) ;THIS MAY NOT BE TRUE NOW! 371: TLO IOS,UDIREN ;FLAG. DIR. ENTERED INTO 372: MOVEM IOS,DEVIOS(DEVDAT) 373: PUSHJ PDP,ADVBFE 374: JFCL 375: SHUFFLE ;ALLOW CORE SHUFFLING AGAIN 376: JRST DIRCH1 ;SET DVDIREN AND UFREE 378: ;INPUT UUO ROUTINE - RING BUFFERED 379: 380: 381: 382: UIN: TLZ IOS,UDMPI+IO ;CLEAR INPUT DUMP BIT AND FLAG AS INPUT 383: HRRZ TAC,DTNEXT(DEVDAT) ;NEXT BLOCK TO READ 384: TRNE IOS,UDSD ;SUPPRESSING DIRECTORY? 385: JRST UIN3 ;YES 386: CAIN TAC,1 ;TRYING TO READ DIRECTORY? 387: JRST UIN2 ;YES, COPY CORE INTO USER AREA 388: UIN3: MOVEI TAC,READ ;SETUP DISPATCH WHEN BLOCK NO. FOUND 389: PUSHJ PDP,UINTER ;NO,CHECK DECTAPE AND DATA CONTROL INTERLOCK 390: 391: ;HERE AT INTERRUPT LEVEL IF NEXT INPUT BUFFER READY FOR DATA 392: 393: UINGO: MOVEI TAC,@DEVIAD(DEVDAT) ;ABS ADR OF USER BUFFER 394: MOVEM TAC,UBUF 395: HRRZ TAC,DTNEXT(DEVDAT) ;NEXT BLOCK TO READ 396: 397: ;HERE FROM OUTPUT UUO ALSO - BLOCK TO READ OR WRITE IN TAC 398: 399: FILL: HRRM TAC,UBKN ;STORE BLOCK NO.TO READ OR WRITE 400: TRNE IOS,UDSD ;NON-STANDARD TAPE? 401: JRST FILL1 ;YES. DON'T CHECK BLOCK NO. 402: CAIL TAC,1102 ;IS IT TOO LARGE? 403: JRST UTBERR ;YES,ILLEGAL BLOCK NO. 404: FILL1: SETZM UERRCN ;CLEAR NO. OF ERRORS FOR THIS OPERATION 405: SETZM ERRFLG ;CLEAR DC DATA MISSED FLAG 406: FILLER: MOVE TAC,[JSR RDBN] ;SETUP TO READ BLOCK NOS. 407: MOVEM TAC,@DCLOC ;IN EVEN DC PI LOC 408: PUSHJ PDP,STOIOS ;STORE IOS AND RESET HUNG DEVICE COUNT 409: MOVEI TAC,RBNTRY ;NUMBER OF REVERSALS WE WILL ALLOW 410: MOVEM TAC,RBNCNT 411: MOVE TAC,DTUNIT ;GET UNIT NO + DTC CHANNEL 412: CONO DC,DCIN ;SET TO READ BLOCK NOS FROM DECTAPE 413: CONO PI,DCTON ;TURN DC PI CHANNEL ON 414: CONSZ DTC,20000 ;IS TAPE MOVING? (IE ARE WE AT INTERRUPT LEVEL) 415: JRST FILLC ;YES 416: TLNN IOS,UREV ;NO, WAS LAST DIRECTION REVERSE? 417: IORI TAC,GR ;NO,REVERSE THIS TIME 418: HRLI TAC,17 ;CONSZ TEST FLAGS 419: IORI TAC,SL+DTR+RB+EE ;CONO FLAGS 420: STARTDV DTC 421: POPJ PDP, ;RETURN 422: 423: FILLC: CONSZ DTC,GR ;TAPE ALREADY MOVING, GOING BACKWARD? 424: IORI TAC,DT ;YES,TURN AROUND DELAY 425: CONO DTC,SL+RB+EE(TAC) ;MAKE GO FORWARD ALWAYS 426: POPJ PDP, ;RETURN AT UUO LEVEL OR DISMISS INTERRUPT 428: ;ILLEGAL BLOCK NO. 429: 430: 431: UTBERR: TRO IOS,IOBKTL ;SET IOBKTL TO INDICATE ILLEGAL BLOCK NO. 432: JRST DTC1 ;STOP TAPE AND DESELECT 433: 434: ;COPY CORE IF TRYING TO READ BLOCK 1 435: 436: 437: 438: UIN2: PUSHJ PDP,DIRCHK ;CHECK IF DIRECTORY IN CORE 439: MOVE TAC1,UFREE(DEVDAT) ;PLACE FREE BLOCK POINTER 440: HRLM TAC1,@UDIR(DEVDAT) ;IN DIRECTORY 441: NOSHUFFLE ;PREVENT CORE SHUFFLING DURING BLT 442: MOVEI TAC,@DEVIAD(DEVDAT) ;ABS. OF 2ND WORD OF BUFFER 443: MOVEI TAC1,1(TAC) ;BUFFER ADDRESS DESTINATION 444: HRL TAC1,UDIR(DEVDAT) ;SOURCE 445: BLT TAC1,200(TAC) ;MOVE DIRECTORY TO BUFFER 446: PUSHJ PDP,ADVBFF ;ADVANCE INPUT BUFFER 447: JFCL ;IGNORE IF NEXT ONE STILL FULL 448: SHUFFLE 449: POPJ PDP, 451: ;COMMON ROUTINE TO CHECK INTERLOCK, INITIALIZE 452: ;CALLED ONLY AT UUO LEVEL 453: ;BITS IN IOS HAVE BEEN SET BUT NOT STORED 454: ;TAC CONTAINS DISPATCH ADR. WHEN BLOCK NO. FOUND 455: ;(READ,WRITE,DREAD,DWRITE) 456: 457: 458: 459: DINTER: TLOA IOS,URDIR ;FLAG DIRECTORY OPERATION 460: UINTER: TLZ IOS,URDIR ;CLEAR DIRECTORY OPERATION BIT 461: PUSHJ PDP,GETDCDT ;GET DATA CONTROL AND DECTAPE CONTROL 462: AOSE DTREQ ;ARGUMENT EXECUTED BY GETDCDT 463: CONO DC,0 ;TURN OFF DATA CONTROL 464: HRRM TAC,BNDISP ;STORE DISPATCH ADR. WHEN BLOCK NO. FOUND 465: LDB TAC,PUNIT ;UNIT NO. OF THIS DECTAPE 466: LSH TAC,3 ;SHIFT TO UNIT POSITION 467: IORI TAC,DTCCHN ;OR IN DT CHANNEL 468: MOVEM TAC,DTUNIT ;SAVE 469: MOVEI TAC,116 470: HRRM TAC, CONSZ1 471: HLRE TAC,UFREE(DEVDAT) ;RESET BLOCK QUANTUM ALLOTMENT 472: MOVEM TAC,BLKCNT ;LET THIS JOB READ THIS MANY BLOCKS 473: ;BEFORE SWITCHING TO ANOTHER JOB 474: ;AS LONG AS TAPE KEEPS MOVING 475: MOVE TAC,[JSR ENPT] ;SETUP END FOR NON-DUMP DC OPERATIONS 476: MOVEM TAC,@DCLOC1 ;IN PI TRAP LOC+1 477: PUSHJ PDP,SETACT ;SET DEV. ACTIVE FLAG AND STORE 478: ;IOS. ALSO RESET HUNG DEVICE TIME COUNT 479: MOVEM DEVDAT,USVDB ;SAVE ADR. OF DEVICE DATA BLOCK 480: MOVEM PROG,UPROG ;SAVE ABS.LOC. OF USER AREA 481: POPJ PDP, 483: ;ROUTINE TO CHECK IF DIRECTORY IN CORE 484: ;IF NOT, IT IS READ IN 485: 486: 487: DIRCHK: TRNN IOS,UDSD ;DIRECTORY BEING SUPPRESSED? 488: SKIPGE DEVMOD(DEVDAT) ;NO. DIRECTORY IN CORE? 489: POPJ PDP, ;YES 490: MOVEI TAC,READ ;DISPATCH ADR. WHEN BLOCK NO. FOUND 491: PUSHJ PDP,UTPRL1 ;READ DIR. AND RETURN WHEN FINISHED 492: HRRZ TAC,@UDIR(DEVDAT) ;CHECK REL. POINTER TO FIRST DIR. ENTRY 493: JUMPE TAC,DIRERR ;BAD IF ZERO 494: CAIL TAC,174 495: JRST DIRERR ;PRINT BAD DIRECTORY AND DO NOT RETURN 496: TLZ IOS,UDIREN+ULINKF+UNWFRE ;BUT NOT ENTERED INTO, LINKED TO FREE 497: ;STORAGE, OR FREE BLOCK POINTER CHANGED 498: DIRCH1: MOVSI TAC,DVDIRIN ;SET DIRECTORY IN CORE BIT. CLEARED BY ASSIGN 499: IORM TAC,DEVMOD(DEVDAT) 500: HLRZ TAC,@UDIR(DEVDAT) ;LAST BLOCK WRITTEN 501: HRRM TAC,UFREE(DEVDAT) ;SAVE IN DEVICE DATA BLOCK 502: POPJ PDP, 504: ;CLOSE UUO 505: ;CALLED ONLY IF THIS USER CHANNEL HAS DONE OUTPUT 506: 507: 508: 509: UTPCLS: SETZM CURENT(DDB) ;CLEAR CURRENT ENTRY POINTER 510: LDB TAC,PIOMOD ;GET DATA MODE? 511: CAIGE TAC,DR ;IS IT DR OR D(DUMP MODE)? 512: TLNN IOS,ULINKF ;NO, NOT LINKED TO FREE STORAGE? 513: POPJ PDP, ;YES, DO NOT WRITE OUT LAST BUFFERFUL 514: MOVE TAC,DEVOAD(DEVDAT) ;ADR. OF USER OUTPUT BUFFER 515: AOS TAC ;ADDRESS THIRD WORD 516: MOVEI TAC1,1 ;SET LINK TO 1 IN LH OF THIRD WORD 517: HRLM TAC1,@TAC ;IN USER AREA(FLAG AS LAST BLOCK) 518: JRST OUT ;DO OUTPUT 520: ;UTPCLR UUO - CLEAR DECTAPE DIRECTORY 521: 522: UTPCLR: TRNE IOS,UDSD ;DIRECTORY BEING SUPPRESSED? 523: POPJ PDP, ;YES 524: TLO IOS,UDIREN+UNWFRE ;NO. FLAG DIR. ENTERED INTO AND UFREE MODIF. 525: MOVE TAC,UDIR(DEVDAT) ;INITIALIZE EXEC CORE DIRECTORY 526: MOVE TAC1,[XWD 1,5] ;SET FIRST WORD IN DIRECTORY 527: MOVEM TAC1,(TAC) ;LH=LAST BLOCK USED,RH=FIRST 528: ;FREE REL. DIR. ENTRY. 529: HRL TAC,TAC 530: AOBJN TAC,.+1 ;INCREMENT BOTH HALVES 531: SETZM (TAC) ;CLEAR SECOND WORD 532: MOVE TAC1,TAC 533: AOS TAC 534: BLT TAC,176(TAC1) ;CLEAR REST OF 200 WORD DIRECTORY 535: PUSHJ PDP,DIRCH1 ;SET DVDIRIN AND UFREE 536: ;ALWAYS WIRITE TAPE 537: 538: ;RELEASE UUO 539: ;WRITE DIRECTORY IF CORE VERSION DIFFERS FROM TAPE VERSION(BLOCK 1) 540: 541: 542: 543: UTPREL: TRZE IOS,UDSD ;SUPPRESSING DIRECTORY? 544: JRST SETI1 ;YES, STORE IOS AND RETURN 545: SKIPG DEVMOD(DEVDAT) ;HAS ASSIGN COMMAND BEEN TYPED 546: ;SINCE DIRECTORY READ IN? 547: TLZN IOS,UDIREN+UNWFRE ;NO, DIR. ENTERED INTO OR 548: ;FREE BLOCK POINTER MODIFIED? 549: POPJ PDP, ;NO, DO NOT WRITE DIRECTORY 550: MOVEI TAC,WRITE ;DISPATCH ADR. WHEN BLOCK NO. FOUND 551: UTPRL1: PUSHJ PDP,DINTER ;CHECK INTERLOCK AND FLAG DIRECT. OPER. 552: MOVE TAC,UFREE(DEVDAT) ;NEW FREE BLOCK POINTER 553: HRLM TAC,@UDIR(DEVDAT) ;STORE IN LH OF FIRST WORD OF DIR. 554: HRRZ TAC,UDIR(DEVDAT) ;ADD. OF EXEC DIR. CORE BUFFER 555: SOS TAC ;ADRRESS-1 556: MOVEM TAC,UBUF ;STORE BUFFER ADR. 557: MOVEI TAC,1 ;WRITE (OR READ) BLOCK 1 558: PUSHJ PDP,FILL ;GO START TAPE 559: JRST WAIT1 ;WAIT BEFORE RETURNING TO USER 561: ;USETI UUO - SET NEXT INPUT BLOCK NO TO READ 562: 563: 564: 565: SETI: PUSHJ PDP,BLKCHK ;CHECK FOR ILLEGAL BLOCK NO. 566: PUSHJ PDP,WAIT1 ;WAIT TILL ALL BUFFERS FILLED. 567: TLZ IOS,IOEND ;CLEAR END OF FILE BIT 568: TRZ IOS,IODEND ;SYSTEM AND USER 569: HRRM UUO,DTNEXT(DEVDAT) ;STORE NEXT BLOCK TO READ IN DDB 570: SETI1: MOVEM IOS,DEVIOS(DEVDAT) 571: POPJ PDP, 572: 573: ;USETO UUO - SET NEXT OUTPUT BLOCK NO. TO WRITE 574: 575: 576: 577: SETO: PUSHJ PDP,BLKCHK ;CHECK FOR LILLEGAL BLOCK NO. 578: PUSHJ PDP,WAIT1 ;WAIT TILL ALL BUFFERS EMPTIED. 579: HRLM UUO,DTNEXT(DEVDAT) ;SET NEXT BLOCK NO. IN DEVICE DATA BLOCK 580: POPJ PDP, 581: 582: ;ROUTINE TO CHECK FOR ILLEGAL BLOCK NUMBER 583: ;CALL MOVE UUO,BLOCK # 584: ; PUSHJ PDP,BLKCHK 585: ; RETURN IF BLOCK NO. OK 586: 587: ;IF NON-STANDARD TAPE (UDSD=1), ALL BLOCK NOS. ARE LEGAL 588: ;OTHERWISE, IF UUO>1101, SETS IOBKTL AND RETURNS TO USER. 589: 590: BLKCHK: TLZ UUO,-1 ;CLEAR LEFT HALF UUO FOR COMPARE. 591: TRNE IOS,UDSD ;NON-STANDARD TAPE? 592: POPJ PDP, ;YES 593: CAIG UUO,1101 ;NO. LEGAL BLOCK NUMBER? 594: POPJ PDP, ;YES 595: TRO IOS,IOBKTL ;NO. SET IOBKTL, STORE IOS 596: JRST SETI1 ;AND RETURN TO USER. 598: ;UGETF UUO - GET NEXT FREE BLOCK NO. 599: ;IF DIRECTORY IS SUPPRESSED, RETURN XWD NEXT BLOCK TO WRITE,NEXT 600: ; BLOCK TO READ. 601: 602: 603: 604: GETF: PUSHJ PDP,WAIT1 ;WAIT TILL DEVICE INACTIVE 605: MOVE TAC,DTNEXT(DEVDAT) 606: TRNE IOS,UDSD ;IS DIRECTORY BEING SUPPRESSED? 607: JRST STOTAC ;YES 608: PUSHJ PDP,DIRCHK ;CHECK TO SEE IF DIRECTORY IN CORE 609: TLO IOS,UNWFRE ;FLAG FREE BLOCK POINTER ALTERED 610: MOVEM IOS,DEVIOS(DEVDAT) 611: AOS TAC,UFREE(DEVDAT) ;GET FREE BLOCK POINTER 612: HRLM TAC,DTNEXT(DEVDAT) ;SET NEXT BLOCK TO WRITE 613: TLZ TAC,-1 614: JRST STOTAC ;STORE TAC IN USER AREA 616: ;READ BLOCK NOS. 617: 618: 619: 620: ↑RDBN1: MOVEM TAC,DTTAC 621: EXCH DEVDAT,USVDB ;RESET HUNG DEVICE TIME COUNT 622: LDB TAC,PDVTIM ;TIME IN SECONDS 623: DPB TAC,PDVCNT ;COUNT DOWN TO 0 BEFORE HUNG 624: EXCH DEVDAT,USVDB 625: DATAI DC,TAC ;READ IN BLOCK NO. JUST READ 626: ANDI TAC,7777 ; FOR PDP-8 FORMAT TAPE, MASK OUT CRAP 627: SUBI TAC,@UBKN ;COMPARE WITH DESIRED ONE 628: JUMPE TAC,@BNDISP ;IS IT EQUAL? 629: SOS BLKCNT ;DECREMENT COUNT OF BLOCKS READ 630: JUMPL TAC,LOW ;NO,IS IT LESS THAN DESIRED? 631: MOVE TAC,DTUNIT ;NO, UNIT NO.+DT CHANNEL 632: CONSZ DTC,GR ;IS TAPE GOING BACKWARD? 633: JRST BAKWRD 634: SOSGE RBNCNT ;ANOTHER REVERESAL 635: JRST RBNLOS ;TOO MANY! 636: IORI TAC,DT ;NO,ADD IN DELAY TO CHANGE DIRECTION 637: BAKWRD: CONO DTC,SL+RB+GR+EE(TAC);MAKE TAPE GO BACKWARD 638: JRST DXIT 639: 640: LOW: MOVE TAC,DTUNIT ;POSITION IS BEFORE DESIRED 641: CONSO DTC,GR ;IS TAPE GOING FORWARD 642: JRST ISLOW 643: SOSGE RBNCNT ;ANOTHER REVERSAL 644: JRST RBNLOS ;TOO MANY! 645: IORI TAC,DT ;NO, ADD IN DELAY TO CHANGE DIRECTION 646: ISLOW: CONO DTC,SL+RB+EE(TAC) ;MAKE TAPE GO FORWARD 647: DXIT: MOVE TAC,DTTAC 648: CONO DC,DCIN ;SET DATA CONTROL TO READ BLOCK NOS. 649: JEN @RDBN 650: 651: RBNLOS: CONO DC,0 ;SHUT OFF DATA CONTROL 652: CONO PI,DCTOFF ;TELL PI ABOUT SHUTTING OFF DECTAPE 653: CONO DTC,200000!JDE!TFE!DTR(TAC) ;SELECT, TURN OFF, SET DELAY, INTERRUPT AT END 654: MOVEI TAC,DTTRY ;MAKE SURE THAT WE 655: MOVEM TAC,UERRCN ;DON'T TRY AGAIN 656: MOVEI TAC,20 ;TURN ON A BIT 657: IORM TAC,DTCCON ;WHERE CH.4 GETS TO TEST IT 658: SETOM ERRFLG ;MAKE SURE IT LOOKS LIKE AN ERROR! 659: MOVE TAC,DTTAC ;RESTORE TAC 660: JEN @RDBN ;DISMISS 662: ;HERE WHEN BLOCK NO.FOUND FOR DUMP OUTPUT 663: 664: 665: DWRITE: MOVE TAC,DTUNIT ;UNIT+DT CHANNEL 666: CONSZ DTC,GR ;TAPE GOING IN REVERSE? 667: JRST BAKWRD ;YES, MAKE IT GO BACKWARD ONE MORE BLOCK 668: CONO DC,DCOUT ;SET DATA CONTROL TO WRITE ON DC CHANNEL 669: CONO DTC,SL+WD+JDE+EE(TAC) 670: MOVE TAC,[BLKO DC,BLKPTR] ;IO INSTR. FOR PI LOC 671: JRST DEXIT 672: 673: ;HERE WHEN BLOCK NO. FOUND FOR DUMP INPUT 674: 675: 676: DREAD: MOVE TAC,DTUNIT ;UNIT + DT CHANNEL 677: CONSZ DTC,GR ;GOING BACKWARDS? 678: JRST BAKWRD ;YES, MAKE IT GO BACKWARD ONE MORE BLOCK. 679: CONO DTC,SL+RD+JDE+EE(TAC) ;NO, SET TO READ(JOB DONE ENABLED) 680: MOVE TAC,[BLKI DC,BLKPTR] 681: DEXIT: MOVEM TAC,@DCLOC ;STORE BLKI/BLKO IN EVEN DC CHANNEL LOC. 682: EXCH DEVDAT,USVDB ;SET HUNG DEVICE COUNT TO 60 SECONDS 683: MOVEI TAC,=60 ;SINCE DUMP MODE CAN TAKE A LONG TIME 684: DPB TAC,PDVCNT 685: EXCH DEVDAT,USVDB 686: MOVE TAC,DMPPTR ;SETUP DUMP BLKI OR BLKO POINTER 687: JRST BNEXIT 689: ;HERE WHEN BLOCK NUMBER FOUND FOR BUFFERED WRITING 690: 691: 692: WRITE: CONO DC,DCOUT ;SET DC FOR WRITING ON DC CHANNEL 693: MOVE TAC,DTUNIT ;DT UNIT+DT CHANNEL 694: CONSO DTC,GR ;GOING BACKWARD? 695: JRST WRFORW ;NO,WRITE FORWARD 696: CONO DTC,SL+WD+GR+JDE+EE(TAC) ;YES, SET TO WRTIE REVERSED 697: MOVE TAC,[JSR WTRV] ;PLACE TO GE FOR EVERY WORD 698: JRST REVBLK ;SET BLKPTR FOR REVERSE 699: 700: WRFORW: CONO DTC,SL+WD+JDE+EE(TAC) ;WRITE FORWARD(JOB DONE ENABLED) 701: MOVE TAC,[BLKO DC,BLKPTR] ;BLKO POINTER FOR INTERRUPT LOCATION 702: JRST FORBLK ;SET BLKPTR FOR FORWARD 704: ;HERE WHEN BLOCK NUMBER FOUND FOR BUFFERED INPUT 705: 706: 707: READ: MOVE TAC,DTUNIT ;UNIT+UTC CHANNEL 708: CONSO DTC,GR ;GOING BACKWARD? 709: JRST RDFORW ;NO,READ FORWARD 710: CONO DTC,SL+GR+RD+JDE+EE(TAC) ;YES, READ BACKWARD(JOB DONE ENB.) 711: MOVE TAC,[JSR RDRV] ;PLACE TO GO FOR EACH WORD 712: REVBLK: MOVEM TAC,@DCLOC ;STORE JSR FOR REVERSE INTERRUPT ON EACH WORD 713: MOVE TAC,UBUF ;ADDRESS OF BUFFER-1(SECOND WORD) 714: ADDI TAC,200-1 ;LAST ADDRESS OF 200 WORD BUFFER 715: JRST BLKXIT ;STORE BLKI/BLKO POINTER 716: 717: RDFORW: CONO DTC,SL+RD+JDE+EE(TAC) ;READ FORWARD(JOB DONE ENABLED) 718: MOVE TAC,[BLKI DC,BLKPTR] ;BLKI POINTER 719: FORBLK: MOVEM TAC,@DCLOC ;STORE BLKI/BLKO IN INTERRUPT LOC. 720: MOVE TAC,UBUF ;ADDRESS OF BUFFER 721: BLKXIT: HRLI TAC,-200 ;WORD COUNT FOR 1 BLOCK 722: BNEXIT: MOVEM TAC,BLKPTR ;SOTRE BLKI OR BLKO POINTER 723: MOVE TAC,DTTAC ;RESTORE TAC 724: JEN @RDBN ;DISMISS DC CHANNEL INTERRUPT 726: ;WRITE 1 BLOCK IN REVERSE DIRECTION 727: 728: ↑WTRV1: BLKO DC,BLKPTR 729: JSR ENPT1 730: SOS BLKPTR 731: SOS BLKPTR 732: JEN @WTRV 733: 734: ;READ 1 BLOCK IN REVERSE DIRECTION 735: 736: ↑RDRV1: BLKI DC,BLKPTR 737: JSR ENPT1 738: SOS BLKPTR 739: SOS BLKPTR 740: JEN @RDRV 742: ↑ENPT0: JSR ENPT1 743: JEN @ENPT 744: 745: ;END OF BLKI OR BLKO BUFFERED IO 746: ;OR END OF DUMP MODE COMAND LIST 747: 748: 749: ↑ENPT2: CONSZ DC,10000 ;DATA MISSED? 750: SETOM ERRFLG ;YES,SET FLAG 751: CONSO DTC,400 ;WRITING? 752: CONO DC,0 ;NO,READING TURN OFF DATA CONTROL 753: CONO PI,DCTOFF ;TURN OFF DATA CONTROL CHANNEL 754: JRST @ENPT1 755: 756: ;END OF BLKI OR BLKO DUMP MODE READING OR WRITING 757: 758: ↑DMPA0: MOVEM TAC,DTTAC 759: AOSA TAC,DMPLST 760: DMPA1: HRRZM TAC,DMPLST 761: SKIPN TAC,(TAC) 762: JRST DMPA3 763: ADD TAC,UDPROG ;ADD XWD 0,USER RELOCATION 764: JUMPGE TAC,DMPA1 765: MOVEM TAC,BLKPTR ;SETUP DUMP MODE BLKI/BLKO POINTER 766: DMPA2: MOVE TAC,DTTAC 767: JEN @DMPADV 768: 769: DMPA3: JSR ENPT1 770: JRST DMPA2 772: ;HERE ON INTERRUPTS ON DECTAPE CONTROL AFTER DATA TRANSMITTED 773: 774: 775: 776: ↑DTCINT: JSR DTCSAV ;SAVE REGISTERS. 777: CONSO DTC,JDE ;JOB DONE ENABLED 778: ;(IE, READ-WRITING DATA OR WAITING 779: ;FOR TIME FLAG) 780: JRST BN ;NO,MUST BE READING BLOCK NOS. 781: CONSO DTC,4000 ;TIME FLAG ENABLED? 782: JRST DCCONO ;NO GO TURN OFF DATA CONTROL 783: SKIPL RBNCNT ;BLOCK NUMBER TRIES EXHAUSTED? 784: JRST UTIME ;NOPE, HONEST TIME FLAG ENABLING 785: SETZM RBNCNT ;SO WE DON'T GO THIS WAY AGAIN 786: MOVEI TAC,20 ;SHUT OFF BIT THAT RBNLOS SET 787: ANDCAM TAC,DTCCON ;SHUT OFF BIT 788: DCCONO: CONO DC,0 ;NO,TURN OFF DATA CONTROL 789: MOVE DEVDAT,USVDB ;SETUP DEVICE DATA BLOCK ADDRESS 790: MOVE PROG,UPROG ;USER RELOC, AND PROTECTION 791: MOVE IOS,DEVIOS(DEVDAT) ;IO STATUS 792: CONSO DTS,@CONSZ1 ;ANY ERRORS?(16 FOR DUMP MODE) 793: SKIPE ERRFLG ;NO,DATA CONTROL MISS DATA? 794: JRST DTREDO ;YES,REDO OPERATION 795: TLZE IOS,IOW ;NO, JOB IN IO WAIT? 796: PUSHJ PDP,SETIOD ;YES,SET JOB TO RUN AGAIN 797: TLZE IOS,URDIR ;READING DIRECTORY? 798: JRST DTC1 ;YES 799: TLNN IOS,IO ;NO,OUTPUT? 800: JRST UIN1 ;NO 801: TLNN IOS,UDMPO ;YES,OUTPUT DUMP MODE? 802: PUSHJ PDP,ADVBFE ;NO,IS NEXT OUTPUT BUFFER NOT READY YET? 803: JRST DTC1 ;YES,STOP TAPE 804: PUSHJ PDP,CHKCNT ;DECREMENT QUANTUM BLOCK COUNT. 805: ;FINISHED QUANTUM? 806: JRST UOUTGO ;NO, GO OUTPUT NEXT BLOCK 807: JRST DTC1 ;YES, STOP TAPE AND LET OTHER USER HAVE IT 808: 809: UIN1: TLNE IOS,UDMPI ;INPUT DUMP MODE? 810: JRST DTC1 ;YES, STOP TAPE 811: MOVEI TAC, @DEVIAD(DEVDAT) ;NO,GET ABS. ADR OF 812: ;BUFFER JUST READ INTO 813: HLRZ TAC1,1(TAC) ;GET LINK TO NEXT BLOCK 814: HRRM TAC1,DTNEXT(DEVDAT) ;STORE NEXT BLOCK TO READ 815: JUMPN TAC1,.+2 ;WAS THIS LAST BLOCK 816: TLO IOS,IOEND ;YES,SET END OF FILE 817: PUSHJ PDP,ADVBFF ;ADVANCE INPUT BUFFER 818: JRST DTC1 ;NOT EMPTIED BY USER YET,STOP TAPE 819: TLNE IOS,IOEND ;WAS THIS LAST BLOCK? 820: JRST DTC1 ;YES, STOP TAPE 821: PUSHJ PDP,CHKCNT ;NO, REDUCE QUANTUM BLOCK COUNT. 822: ;FINISHED QUANTUM? 823: JRST UINGO ;NO, GO READ IN NEXT BLOCK 824: ;YES, STOP TAPE AND SCHEDULER WILL RUN WAITING JOB 826: ;STOP TAPE AND DESELECT THIS UNIT BEFORE GOING TO ANOTHER UNIT 827: 828: 829: 830: 831: DTC1: CONSO DTC,20000 ;IS TAPE MOVING? I.E., AT INTERRUPT LEVEL? 832: JRST DTC2 ;NO. 833: SKIPG TAC,BLKCNT ;RESTORE BLOCK COUNT 834: MOVEI TAC,BLKQNT 835: HRLM TAC,UFREE(DEVDAT) 836: MOVEI TAC,DTCCHN ;DTC PI CHANNEL 837: TLO IOS,UREV ;REMEMBER DIRECTION, SET REVERSE BIT 838: CONSO DTC,GR ;TAPE GOING FORWARDS? 839: TLZA IOS,UREV ;YES, CLEAR REVERSE BIT 840: TRO TAC,GR ;NO, PRESERVE DIRECTION FOR STOP CONO 841: MOVEI TAC1,20 ;ENABLE SOFTWARE FOR TIME FLAG ONLY 842: HRRM TAC1,DTCCON 843: CONO DTC,TFE+RDS+JDE(TAC) ;STOP TAPE AND ENABLE 844: ;TIME FLAG AND JOB DONE(AS A FLAG ONLY) 845: ;SO WONT THINK READING BLOCK NOS. AT 846: ;DTCINT+1 CONSO INSTRUCTION 847: DTC3: SOSL DCREQ ;DECREMENT DATA CONTROL REQUEST COUNT 848: SETOM DCAVAL 849: PUSHJ PDP,CLRACT ;CLEAR DEVICE ACTIVE FLAG, STORE IOS 850: LDB ITEM,PJOBN 851: TLNN DEVDAT,SYSDEV ;SYSTEM TAPE? 852: POPJ PDP, ;NO 853: HLRZ TAC,JBTSTS(ITEM) ;YES 854: TRNN TAC,CMWB ;DELAY ↑C? 855: POPJ PDP, ;NO 856: JRST RELEA9 ;YES. RELEASE SYSTEM TAPE. 857: 858: DTC2: PUSHJ PDP,DTC3 ;FREE DC AND SYSTEM TAPE 859: SOSL DTREQ 860: SETOM DTAVAL 861: CONO DC,0 862: CONO PI,DCTOFF 863: CONO DTC,0 864: HLLZS DTCCON 865: POPJ PDP, 866: 867: 868: ;CHECK BLKCNT. IF IT IS < 0 AND SOMEONE IS WAITING FOR THE 869: ;DATA CONTROL OR DECTAPE CONTROL, STOP THE TAPE. 870: 871: ;CALL PUSHJ PDP,CHKCNT 872: ; CONTINUEα; STOP TAPE 873: 874: 875: CHKCNT: SOSLE BLKCNT ;COUNT RUN OUT? 876: POPJ PDP, ;NO. CONTINUE 877: SKIPN DCREQ ;YES. IS SOMEONE WAITING FOR DATA CONTROL? 878: SKIPE DTREQ ;NO. DECTAPE CONTROL? 879: AOS (PDP) ;YES. STOP TAPE. 880: POPJ PDP, 882: ;INTERRUPT ON DT CHANNEL WHILE READING BLOCK NOS. ON DC CHANNEL 883: 884: BN: CONSZ DTS,2 ;END OF TAPE FLAG? 885: JRST ENDZON ;YES,REVERSE DIRECTION 886: ;MUST BE AN ERROR FLAG OF SOME SORT. 887: JRST DCCONO ;YES, STOP TAPE 888: 889: ENDZON: MOVE TAC,DTUNIT ;MUST BE READING BLOCK NOS. 890: CONSO DTC,GR ;GOING BACKWARDS? 891: IORI TAC,GR ;NO, MAKE IT GO BACKWARDS. 892: CONO DTC,SL+RB+EE+DT(TAC) ;KEEP READING BLOCK NOS. 893: CONO DC,DCIN ;SET DC TO READ BLOCK NOS. AGAIN. 894: POPJ PDP, 895: 896: ;INTERRUPT FROM TIME FLAG AFTER STOP DEVICE 897: 898: 899: 900: UTIME: 901: SOSL DTREQ ;YES, REDUCE DECTAPE CONTROL REQUEST COUNT 902: SETOM DTAVAL ;SOME OTHER JOB WAITING, SET AVAILABLE FLAG 903: ;FOR SCHEDULER 904: CONO DTC,0 ;CLEAR CONTROL(AND UTS) 905: HLLZS DTCCON ;CLEAR CONSO UTS, FLAGS 906: POPJ PDP, ;DISMISS INTERRUPT. 907: 909: ;HERE ON EACH OF 5 TYPES OF HARDWARE DETECTED ERRORS 910: ;EACH OPERATION CAUSING AN ERROR IS TRIED "DTTRY" TIMES AS 911: ;DEFINED ON THE CONFIGURATION 912: ;A "FATAL ERROR" IS ONE WHICH FAILS DTTRY TIMES IN A ROW 913: ; THEN AND ONLY THEN THE IOS WORD IS SET APPROPRIATELY 914: ; TO INDICATE TO THE USER THAT AN ERROR HAS OCCURRED 915: ;A RECORD OF ALL ERRORS(FATAL AND NON-FATAL) IS KEPT FOR 916: ;ALL DRIVES COMBINED 917: ;A RECORD OF EACH FATAL ERROR IS ALSO KEPT FOR EACH 918: ;DRIVE AS WELL AS FOR ALL DRIVES COMBINED 919: 920: ;THE ERROR COUNT IS SPLIT INTO 5 FIELDS TO MAKE A TOTAL 921: ;IF 36 BITS: 922: ;THE 5 TYPES IF ERRORS ARE: 923: ;ERROR COUNT ;IOS BIT ;DESCRIPTION 924: ECDERR←←1 ;(RH)IODERR ;DC DETECTS DATA MISSED(DEVICE ERROR) 925: ECDTER←←1000 ;(RH)IODTER ;PARITY ERROR(UTS)(DATA ERROR) 926: ECBKTL←←1 ;(LH)IOBKTL ;INCOMPLETE BLOCK(UTS)(BLOCK TOO LARGE) 927: ECIMPM←←100 ;(LH)IOIMPM ;TWO UNITS DIALED THE SAME 928: ;OR MARK TRACK ERROR, BOTH DETECTED 929: ;WHILE READING BLOCK NOS.(IMPROPER MODE) 930: ECIMP1←←10000 ;(LH)IOIMPM ;ATTEMPT TO WRITE ON WRITE-LOCKED TAPE 932: DTREDO: SKIPE TAC,ERRFLG ;CLEAR ERROR COUNT,DID DC MISS DATA? 933: MOVEI TAC,IODERR+ECDERR ;YES, CLEAR TAC,SET DEVICE ERROR 934: ;FLAG, ERROR COUNT POSITION 935: CONSZ DTS,10 ;NO, PARITY ERROR? 936: TRO TAC,IODTER+ECDTER ;YES, SET DATA ERROR FLAG+COUNT 937: CONSZ DTS,100 ;NO, INCOMPLETE BLOCK? 938: TDO TAC,[XWD ECBKTL,IOBKTL] ;YES, SET BLOCK TOO LARGE+COUNT 939: CONSO DTS,4 ;NO, ILLEGAL OPERATION? 940: JRST ERSTOP ;NO 941: TRO TAC,IOIMPM ;YES, FLAG AS IMPROPER MODE 942: CONSO DTC,JDE ;READING BLOCK NOS.(JOB DONE NOT ENABLED)? 943: TLOA TAC,ECIMPM ;YES, 2 UNITS MUST BE DIALED THE SAME 944: TLO TAC,ECIMP1 ;NO, MUST BE WRITE LOCKED 945: ERSTOP: MOVE TAC1,TAC ;INCREMENT ERROR COUNT 946: TRZ TAC1,IODERR+IODTER+IOBKTL+IOIMPM ;CLEAR OUT IOS ERROR BITS 947: ADDM TAC1,DTOTAL ;ADD TO TOTAL ERROR COUNT FOR ALL UNITS 948: AOS DAT,UERRCN ;INCREMENT ERROR COUNT 949: CAIGE DAT,DTTRY ;EQUAL TO DTTRY YET? 950: JRST DTRED1 ;NO, TRY AGAIN 951: ADDM TAC1,DFTOTAL ;ADD TO TOTAL FATAL ERROR COUNT 952: ADDM TAC1,DTERR(DEVDAT) ;ADD TO FATAL COUNT FOR THIS UNIT 953: TRZ TAC,ECDERR+ECDTER ;CLEAR RH COUNT BITS 954: TRNE IOS,IOIMPM ;HAS USER BEEN TOLD ABOUT BAD OPERATION? 955: TLZ IOS,URDIR ;YES. CLEAR URDIR SO WILL RETURN TO USER 956: TRO IOS,(TAC) ;SET ERROR BITS IN IO STATUS WORD 957: TLZE IOS,IOW ;JOB IN IO WAIT? 958: PUSHJ PDP,SETIOD ;YES, START JOB UP AGAIN 959: TLZN IOS,URDIR ;DIRECTORY ERROR? 960: JRST DTC1 ;NO, STOP TAPE WITHOUT SETTING BUFFER USE BIT 961: PUSHJ PDP,DTC1 962: DIRERR: MOVSI TAC,DVDIRIN ;YES, CLEAR DIRECTORY IN CORE BIT 963: ANDCAM TAC,DEVMOD(DEVDAT) 964: LDB ITEM,PJOBN ;LOAD JOB NUMBER INTO ITEM. 965: JRST BADDIR ;PRINT BAD DIRECTORY AND STOP JOB 966: 967: 968: DTRED1: LDB TAC1,PIOMOD 969: CAIGE TAC1,16 ;DUMP MODE? 970: JRST FILLER ;NO 971: TRNE TAC,IODTER+IODERR ;YES. PARITY OR DATA MISSED? 972: SOS DMPLST ;YES. BACK UP POINTER 973: JRST FILLER 974: 975: BEND DTCSER